package com.tarena.demo.luban.all.main.controller;

import com.tarena.demo.luban.all.main.service.IStockService;
import com.tarena.demo.luban.commons.restful.JsonResult;
import com.tarena.demo.luban.protocol.stock.param.StockReduceCountParam;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/base/stock")
@Api(tags = "库存")
public class StockController {

    @Autowired
    IStockService stockService;

    @PostMapping("/update")
    public JsonResult update(StockReduceCountParam stockReduceCountParam){
        stockService.update(stockReduceCountParam);
        return JsonResult.ok("删除成功！");
    }
}
